<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="cn.edu.zzuli.web.dao.CreateIndex"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>后台登录</title>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/resources/css/reset.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/resources/css/style.css" media="screen" />
		<link id="color" rel="stylesheet" type="text/css"
			href="<%=path%>/resources/css/colors/blue.css" />
		<script src="<%=path%>/resources/scripts/jquery-1.4.2.min.js"
			type="text/javascript"></script>
		<script src="<%=path%>/resources/scripts/jquery-ui-1.8.custom.min.js"
			type="text/javascript"></script>
		<script src="<%=path%>/resources/scripts/smooth.js"
			type="text/javascript"></script>
		<script type="text/javascript">
			$(document).ready(function () {
				style_path = "<%=path%>/resources/css/colors";
				$("input.focus").focus(function () {
					if (this.value == this.defaultValue) {
						this.value = "";
					}
					else {
						this.select();
					}
				});
				$("input.focus").blur(function () {
					if ($.trim(this.value) == "") {
						this.value = (this.defaultValue ? this.defaultValue : "");
					}
				});
				$("input:submit, input:reset").button();
				$("#username").focus();
			});
		</script>
	</head>
	<body>
		<div id="login">
			<!-- login -->
			<div class="title">
				<h5>
					登录
				</h5>
				<div class="corner tl"></div>
				<div class="corner tr"></div>
			</div>
			<div class="messages">
				<c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION}">	
				<div id="message-error" class="message message-error">
					<div class="image">
						<img src="<%=path%>/resources/images/icons/error.png" alt="Error"
							height="32" />
					</div>
					<div class="text">
						<h6>
							登录错误！
						</h6>
						<span></span>
					</div>
					<div class="dismiss">
						<a href="#message-error"></a>
					</div>
				</div>
				</c:if>
			</div>
			<div class="inner">
				<form action="<%=path%>/j_spring_security_check" method="post">
					<div class="form">
						<!-- fields -->
						<div class="fields">
							<div class="field">
								<div class="label">
									<label for="username">
										用户名:
									</label>
								</div>
								<div class="input">
									<input type="text" id="username" name="j_username" size="40"
										value="${sessionScope['SPRING_SECURITY_LAST_USERNAME']}"
										class="focus" />
								</div>
							</div>
							<div class="field">
								<div class="label">
									<label for="password">
										密码:
									</label>
								</div>
								<div class="input">
									<input type="password" id="password" name="j_password"
										size="40" value="" class="focus" />
								</div>
							</div>
							<div class="field">
								<div class="checkbox">
									<input type="checkbox" id="remember"
										name="_spring_security_remember_me" />
									<label for="remember">
										记住我
									</label>
								</div>
							</div>
							<div class="buttons">
								<!--验证码：
								<input type="text" size="4" maxlength="6" name="code" />-->
								<input type="submit" value="登录" />
							</div>
						</div>
						<!-- end fields -->
						<!-- links -->
						<div class="links">
							<a href="#">忘记密码?</a>
						</div>
						<!-- end links -->
					</div>
				</form>
			</div>
			<!-- end login -->
			<div id="colors-switcher" class="color">
				<a href="" class="blue" title="Blue"></a>
				<a href="" class="green" title="Green"></a>
				<a href="" class="brown" title="Brown"></a>
				<a href="" class="purple" title="Purple"></a>
				<a href="" class="red" title="Red"></a>
				<a href="" class="greyblue" title="GreyBlue"></a>
			</div>
		</div>
	</body>
</html>